package com.iv.durian.cloud.dao;

import com.iv.durian.cloud.Notice;
import com.iv.durian.cloud.dao.mapper.NoticeMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public class NoticeDao {
    @Autowired
    private NoticeMapper noticeMapper;

    public Notice get(Integer id, Integer lessionId) {
        return noticeMapper.get(id, lessionId);
    }

    public int add(Notice notice) {
        return noticeMapper.add(notice);
    }

    public int update(Notice notice) {
        return noticeMapper.update(notice);
    }

    public int remove(Integer id) {
        return noticeMapper.remove(id);
    }

    public int count(Notice notice) {
        return noticeMapper.count(notice);
    }

    public List<Notice> list(Integer lessionId, Integer offset, Integer limit) {
        return noticeMapper.list(lessionId, offset, limit);
    }

}
